package com.module.overview.ui.schedule

import com.chad.library.adapter.base.BaseProviderMultiAdapter
import com.chad.library.adapter.base.provider.BaseItemProvider
import com.common.app.data.bean.overView.CardSettingModel
import com.common.app.widget.provider.CommonEmptyProvider
import com.module.overview.ui.schedule.provider.OvMainActivityCardProvider
import com.module.overview.ui.schedule.provider.OvMainExerciseCardProvider
import com.module.overview.ui.schedule.provider.OvMainPeriodCardProvider
import com.module.overview.ui.schedule.provider.OvMainPressureCardProvider
import com.module.overview.ui.schedule.provider.OvMainSignsCardProvider
import com.module.overview.ui.schedule.provider.OvMainSleepCardProvider

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：16/6/2025
 *
 * 描述：
 *
 * 修订历史：
 *
 */
class OverviewMainCardAdapter : BaseProviderMultiAdapter<CardSettingModel>() {

    init {
        addItemProvider(CommonEmptyProvider<CardSettingModel>())
        addItemProvider(OvMainSleepCardProvider())
        addItemProvider(OvMainActivityCardProvider())
        addItemProvider(OvMainPressureCardProvider())
        addItemProvider(OvMainSignsCardProvider())
        addItemProvider(OvMainExerciseCardProvider())
        addItemProvider(OvMainPeriodCardProvider())
    }

    override fun getItemType(data: List<CardSettingModel>, position: Int): Int {
        return data[position].itemType
    }

    fun getCusItemProvider(viewType: Int): BaseItemProvider<CardSettingModel>? {
        return getItemProvider(viewType)
    }

}